<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">


<ui:composition template="/WEB-INF/template/templateAdmin.xhtml">
	<ui:define name="content">
		<div class="content">
			<f:view locale="#{language.locale}">
				<div class="adminContent">
					<div class="SLSearchByType">
					<center>
						<p class="SLSearchByType">#{msg.searchByType}</p>


						<h:form>
							<h:selectManyListbox id="list" value="#{logTypesDTO.types}">
								<f:selectItem itemValue="create_resource"
									itemLabel="#{msg.create_resource}" />
								<f:selectItem itemValue="modify_resource"
									itemLabel="#{msg.modify_resource}" />
								<f:selectItem itemValue="create_user" itemLabel="#{msg.create_user}" />
								<f:selectItem itemValue="create_repository"
									itemLabel="#{msg.create_repository}" />
								<f:selectItem itemValue="transfer_rights"
									itemLabel="#{msg.transfer_rights}" />
								<f:selectItem itemValue="delete_repository"
									itemLabel="#{msg.delete_repository}" />
								<f:selectItem itemValue="invalidate_user"
									itemLabel="#{msg.invalidate_user}" />
								<f:selectItem itemValue="unlock_resource"
									itemLabel="#{msg.unlock_resource}" />
								<f:selectItem itemValue="delete_resource"
									itemLabel="#{msg.delete_resource}" />
								<f:selectItem itemValue="modify_user" itemLabel="#{msg.modify_user}" />
							</h:selectManyListbox>
							<br />
							<br />

							<h:commandButton id="typSubmit" class="createRepositoryButton"
								value="#{msg.search}" style="height: 29px; width: 100px; "
								action="#{typesDTOController.print}"
								rerender="wrapper noresults">

							</h:commandButton>
							
							<h:commandButton id="typ2Submit" class="createRepositoryButton"
								value="#{msg.searchAll}" style="height: 29px; width: 100px; "
								action="#{typesDTOController.getAll}" rerender="wrapper noresults">

							</h:commandButton>
							
							

						
							
							



						</h:form>
						</center>
					</div>
					<br/>
					<div class="SLSearchByType2">
<center>
						<h:form id="form2" style="margin-top:10px;">
							<h:panelGroup id="wrapper" rendered="#{typesDTOController.show}">
								
								<h:outputText value="#{msg.searchResults}" class="SLSearchByType"/>
								<br/><br/>
								<h:dataTable id="dt1"
									value="#{typesDTOController.result}" var="item"
									styleClass="order-table" headerClass="order-table-header"
									rowClasses="order-table-odd-row,order-table-even-row"
									columnClasses="order-table-column" cellpadding="10em">

									

									<h:column headerClass="leftHead">
										<f:facet name="header" >
											<h:commandLink class="ZsomborSearch" action="#{typesDTOController.sortById}">
													<h:outputText value="id" />
													<h:panelGroup rendered="#{typesDTOController.showIdIcon}">
														<h:graphicImage
															rendered="#{typesDTOController.sortAscending}"
															value="/resources/images/icon_up_sort_arrow.png" />
														<h:graphicImage
															rendered="#{!typesDTOController.sortAscending}"
															value="/resources/images/icon_down_sort_arrow.png" />
													</h:panelGroup>
												</h:commandLink>
										</f:facet>
										<h:outputText value="#{item.id}" />
									</h:column>

									<h:column>
										<f:facet name="header">
											<h:outputText value="#{msg.logType}" />
										</f:facet>
										<h:outputText value="#{msg[item.logType]}" />
									</h:column>

									<h:column>
										<f:facet name="header">
											<h:outputText value="#{msg.content}" />
										</f:facet>
										<h:outputText value="#{item.content}" />
									</h:column>

									<h:column>
										<f:facet name="header">
											<h:outputText value="#{msg.date}" />
										</f:facet>
										<h:outputText value="#{item.date}" />
									</h:column>

									<h:column  headerClass="rightHead">
										<f:facet name="header">
											<h:commandLink class="ZsomborSearch" action="#{typesDTOController.sortBySender}">
    											<h:outputText value="#{msg.sender}" />
    											<h:panelGroup rendered="#{typesDTOController.showSenderIcon}">
    											<h:graphicImage rendered="#{typesDTOController.sortAscending}" value="/resources/images/icon_up_sort_arrow.png"/>
    											<h:graphicImage rendered="#{!typesDTOController.sortAscending}" value="/resources/images/icon_down_sort_arrow.png"/>
    											</h:panelGroup>
    			  							</h:commandLink>
										</f:facet>
										<h:outputText value="#{item.sender}" />
									</h:column>

								</h:dataTable>
							</h:panelGroup>
							<h:outputText id="noresults" value="#{msg.errorResult}"
								rendered="#{typesDTOController.errshow}" />
						</h:form>
</center>
					</div>

				</div>
			</f:view>
		</div>
	</ui:define>
</ui:composition>
</html>